package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"week1/client/internal/config"
	"week1/textrpc/textrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	TextRpc textrpcclient.Textrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		TextRpc: textrpcclient.NewTextrpc(zrpc.MustNewClient(c.TextRpc)),
	}
}
